﻿<Window x:Class="Samples.BrushCategory.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:pg="http://schemas.denisvuyka.wordpress.com/wpfpropertygrid"    
    xmlns:local="clr-namespace:Samples.BrushCategory"
    Title="Brush category" Height="768" Width="1024" WindowStartupLocation="CenterScreen">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition />
      <ColumnDefinition />
    </Grid.ColumnDefinitions>

    <StackPanel x:Name="objectPanel" Grid.Column="0" Margin="0,10,10,0">
      <TextBlock TextWrapping="Wrap">
        Brush category editor
      </TextBlock>
    </StackPanel>

    <GridSplitter Width="2" Background="Black" />

    <pg:PropertyGrid x:Name="propertyGrid"
                     Grid.Column="1"
                     PropertyDisplayMode="All"
                     ShowAttachedProperties="False"
                     ShowReadOnlyProperties="False">
      <pg:PropertyGrid.Resources>
        <ResourceDictionary>
          <ResourceDictionary.MergedDictionaries>            
            <pg:KaxamlTheme/>
          </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
      </pg:PropertyGrid.Resources>
      <pg:PropertyGrid.Layout>

        <pg:CategorizedLayout/>

      </pg:PropertyGrid.Layout>
      <pg:PropertyGrid.Editors>

        <pg:CategoryEditor DeclaringType="{x:Type local:BrushProxy}"
                          CategoryName="Brushes"
                          InlineTemplate="{StaticResource  mydata}"/>
      </pg:PropertyGrid.Editors>



    </pg:PropertyGrid>
  </Grid>
</Window>
